#include<iostream>
#include<algorithm>
#include<cmath>

using namespace std;
const int N = 1e3 + 10;
int n;
double d;
struct node
{
	int l;
	int r;
}a[N];

bool cmp(node& x1, node& x2)
{
	return x1.l < x2.l;
}

int main()
{
	int k = 1;
	while (cin >> n >> d, n && d)
	{
		bool falsh = false;
		
		for (int i = 1;i<=n; i++)
		{
			double x, y; cin >> x >> y;
			if (y > d)
			falsh = true;
			double l = sqrt(d * d - y * y);
			a[i].l = x - l; a[i].r = x + l;

		}
		if (falsh)
		{
			printf("Case %d: -1\n", k++);
		}
		else
		{
			sort(a + 1, a + 1 + n, cmp);
			int ret = 1; double r = a[1].r;
			for (int i = 2; i <= n; i++)
			{
				double left = a[i].l, right = a[i].r;
				if (left <= r)
				{
					r = min(r,right);
				}
				else
				{
					ret++;
					r = right;
				}
			}
			printf("Case %d: %d\n", k++,ret);
		}
	}


	return 0;
}
